//
//  T2_1_CCell.swift
//  Pods
//
//  Created by eme on 2017/4/10.
//
//

/*
 owner:cy
 update:2017年04月10日18:17:57
 info: 导航类 cell
 VC :  HomePageVc
 */

import UIKit
import RxSwift
import UtilCore
import RickonCore

class T2_1_CCell: UICollectionViewCell {
    
    static let cellTop:CGFloat = 4
    static let interitemSpacing:CGFloat = 0
    static let cellBottom:CGFloat = 4
    static let cellLeft:CGFloat = 0
    static let cellRight:CGFloat = 0
    static var cellSize:CGSize{
        get{
            let width = (screen_Width - 3*T2_1_CCell.interitemSpacing - T2_1_CCell.cellLeft - T2_1_CCell.cellRight)/4 
            let height = screen_Width * 179/750
            return CGSize(width: width, height: height)
        }
    }
    static var cellEdgeInsets:UIEdgeInsets{
        get{
            return  UIEdgeInsets(top: T2_1_CCell.cellTop, left: T2_1_CCell.cellLeft, bottom: T2_1_CCell.cellBottom, right: T2_1_CCell.cellRight)
        }
    }
    static var cellInteritemSpacing:CGFloat{
        get{
            return T2_1_CCell.interitemSpacing
        }
    }
    
    @IBOutlet weak var btnLogo_ImgV: UIImageView!
    
    @IBOutlet weak var btnTitle_Lb: UILabel!
    
    var item:T2ListModel?{
        didSet{
            if let item = self.item {
                self.btnLogo_ImgV.setUrlImage(item.pic)
                self.btnTitle_Lb.text = item.title
            }
        }
    }
    
    
    override func awakeFromNib() {
        self.btnTitle_Lb.normal_fontSize(12)
    }
}
